#!/bin/bash

PHP_VERSION=php-5.6.9
PHP_FPM_PORT=9056
PHP_ALIAS=php56

yum install -y unzip

unzip 2.2.8.zip

cd phpredis-2.2.8

/usr/local/${PHP_ALIAS}/bin/phpize

./configure --with-php-config=/usr/local/${PHP_ALIAS}/bin/php-config

make && make install

cat > /usr/local/${PHP_ALIAS}/etc/php.ini << EOF
extension=redis.so
EOF


# 重新启动php-fpm
/etc/init.d/${PHP_ALIAS}-fpm restart